home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat2 / standard / statvfs.z / statvfs
Encoding:
Text File  |  2002-10-03  |  12.8 KB  |  199 lines

  1.  
  2.  
  3.  
  4. ssssttttaaaattttvvvvffffssss((((2222))))                                                          ssssttttaaaattttvvvvffffssss((((2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _ssss_tttt_aaaa_tttt_vvvv_ffff_ssss, _ffff_ssss_tttt_aaaa_tttt_vvvv_ffff_ssss, _ssss_tttt_aaaa_tttt_vvvv_ffff_ssss_6666_4444, _ffff_ssss_tttt_aaaa_tttt_vvvv_ffff_ssss_6666_4444 - get file system information
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_>>>>
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_ssss_tttt_aaaa_tttt_vvvv_ffff_ssss_...._hhhh_>>>>
  14.  
  15.      _iiii_nnnn_tttt _ssss_tttt_aaaa_tttt_vvvv_ffff_ssss _((((_cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_pppp_aaaa_tttt_hhhh_,,,, _ssss_tttt_rrrr_uuuu_cccc_tttt _ssss_tttt_aaaa_tttt_vvvv_ffff_ssss _****_bbbb_uuuu_ffff_))))_;;;;
  16.  
  17.      _iiii_nnnn_tttt _ssss_tttt_aaaa_tttt_vvvv_ffff_ssss_6666_4444 _((((_cccc_oooo_nnnn_ssss_tttt _cccc_hhhh_aaaa_rrrr _****_pppp_aaaa_tttt_hhhh_,,,, _ssss_tttt_rrrr_uuuu_cccc_tttt _ssss_tttt_aaaa_tttt_vvvv_ffff_ssss_6666_4444 _****_bbbb_uuuu_ffff_))))_;;;;
  18.  
  19.      _iiii_nnnn_tttt _ffff_ssss_tttt_aaaa_tttt_vvvv_ffff_ssss _((((_iiii_nnnn_tttt _ffff_iiii_llll_dddd_eeee_ssss_,,,, _ssss_tttt_rrrr_uuuu_cccc_tttt _ssss_tttt_aaaa_tttt_vvvv_ffff_ssss _****_bbbb_uuuu_ffff_))))_;;;;
  20.  
  21.      _iiii_nnnn_tttt _ffff_ssss_tttt_aaaa_tttt_vvvv_ffff_ssss_6666_4444 _((((_iiii_nnnn_tttt _ffff_iiii_llll_dddd_eeee_ssss_,,,, _ssss_tttt_rrrr_uuuu_cccc_tttt _ssss_tttt_aaaa_tttt_vvvv_ffff_ssss_6666_4444 _****_bbbb_uuuu_ffff_))))_;;;;
  22.  
  23. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  24.      _ssss_tttt_aaaa_tttt_vvvv_ffff_ssss returns a ``generic superblock'' describing a file system; it can
  25.      be used to acquire information about mounted file systems.  _b_u_f is a
  26.      pointer to a structure (described below) that is filled by the system
  27.      call.
  28.  
  29.      _p_a_t_h should name a file that resides on that file system.  The file
  30.      system type is known to the operating system.  Read, write, or execute
  31.      permission for the named file is not required, but all directories listed
  32.      in the path name leading to the file must be searchable.
  33.  
  34.      The _ssss_tttt_aaaa_tttt_vvvv_ffff_ssss structure pointed to by _b_u_f includes the following members:
  35.  
  36.           ulong_t   f_bsize;       /* preferred file system block size */
  37.           ulong_t   f_frsize;      /* fundamental filesystem block size
  38.                                    (if supported) */
  39.           ulong_t   f_blocks;      /* total # of blocks on file system
  40.                                    in units of f_frsize */
  41.           ulong_t   f_bfree;       /* total # of free blocks */
  42.           ulong_t   f_bavail;      /* # of free blocks avail to
  43.                                    non-superuser */
  44.           ulong_t   f_files;       /* total # of file nodes (inodes) */
  45.           ulong_t   f_ffree;       /* total # of free file nodes */
  46.           ulong_t   f_favail;      /* # of inodes avail to
  47.                                    non-superuser */
  48.           ulong_t   f_fsid;             /* file system id (dev for now) */
  49.           char f_basetype[FSTYPSZ];     /* target file system type name,
  50.                                    null-terminated */
  51.           ulong_t   f_flag;             /* bit mask of flags */
  52.           ulong_t   f_namemax;          /* maximum file name length */
  53.           char f_fstr[32];         /* file system specific string */
  54.           ulong_t   f_filler[16];       /* reserved for future expansion */
  55.  
  56.  
  57.      _ffff______bbbb_aaaa_ssss_eeee_tttt_yyyy_pppp_eeee contains a null-terminated FSType name of the mounted target
  58.      (e.g. _iiii_ssss_oooo_9999_6666_6666_0000 mounted over _nnnn_ffff_ssss will contain _iiii_ssss_oooo_9999_6666_6666_0000).
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ssssttttaaaattttvvvvffffssss((((2222))))                                                          ssssttttaaaattttvvvvffffssss((((2222))))
  71.  
  72.  
  73.  
  74.      The following flags can be returned in the _ffff______ffff_llll_aaaa_gggg field:
  75.  
  76.           ST_RDONLY 0x00000001     /* read-only file system */
  77.           ST_NOSUID 0x00000002     /* does not support setuid/setgid
  78.                                    semantics */
  79.           ST_NOTRUNC     0x00000004     /* does not truncate file names
  80.                                    longer than {NAME_MAX} */
  81.           ST_NODEV  0x20000000     /* disallow opening of device files */
  82.           ST_GRPID  0x40000000     /* group-ID assigned from directory */
  83.           ST_LOCAL  0x80000000     /* local filesystem, for find */
  84.  
  85.  
  86.      _ffff_ssss_tttt_aaaa_tttt_vvvv_ffff_ssss is similar to _ssss_tttt_aaaa_tttt_vvvv_ffff_ssss, except that the file named by _p_a_t_h in
  87.      _ssss_tttt_aaaa_tttt_vvvv_ffff_ssss is instead identified by an open file descriptor _f_i_l_d_e_s obtained
  88.      from a successful _oooo_pppp_eeee_nnnn, _cccc_rrrr_eeee_aaaa_tttt, _dddd_uuuu_pppp, _ffff_cccc_nnnn_tttt_llll, or _pppp_iiii_pppp_eeee system call.
  89.  
  90.      _ssss_tttt_aaaa_tttt_vvvv_ffff_ssss_6666_4444 and _ffff_ssss_tttt_aaaa_tttt_vvvv_ffff_ssss_6666_4444 are similar to _ssss_tttt_aaaa_tttt_vvvv_ffff_ssss and _ffff_ssss_tttt_aaaa_tttt_vvvv_ffff_ssss
  91.      respectively, except that the structure fields _ffff______bbbb_llll_oooo_cccc_kkkk_ssss, _ffff______bbbb_ffff_rrrr_eeee_eeee,
  92.      _ffff______bbbb_aaaa_vvvv_aaaa_iiii_llll, _ffff______ffff_iiii_llll_eeee_ssss, _ffff______ffff_ffff_rrrr_eeee_eeee, and _ffff______ffff_aaaa_vvvv_aaaa_iiii_llll are 64-bit values instead of
  93.      _uuuu_llll_oooo_nnnn_gggg______tttts.  The block-count fields are of type _bbbb_llll_kkkk_cccc_nnnn_tttt______tttt and the file-count
  94.      fields are of type _ffff_iiii_llll_cccc_nnnn_tttt______tttt.  These fields can normally overflow in a
  95.      non-64-bit call only in a 32-bit application on an XFS filesystem whose
  96.      size is larger than 1 terabyte.
  97.  
  98.      For XFS filesystems with real-time subvolumes (see xfs(4)), the
  99.      _ssss_tttt_aaaa_tttt_vvvv_ffff_ssss(2) system call returns information concerning the data portion of
  100.      the filesystem only.  The _ssss_yyyy_ssss_ssss_gggg_iiii(2) system call with the
  101.      SGI_XFS_FSOPERATIONS request argument can be used to acquire information
  102.      concerning the size and usage of space within the real-time portion of
  103.      the filesystem.
  104.  
  105.      The SSSSTTTT____LLLLOOOOCCCCAAAALLLL flag is off for regular files which are also swap files,
  106.      since they cannot be read even if permissions allow it.  This allows
  107.      programs to detect this situation without trying to read data from such
  108.      files.
  109.  
  110.      _ssss_tttt_aaaa_tttt_vvvv_ffff_ssss fails if one or more of the following are true:
  111.  
  112.      _EEEE_AAAA_CCCC_CCCC_EEEE_SSSS         Search permission is denied on a component of the path
  113.                     prefix.
  114.  
  115.      _EEEE_FFFF_AAAA_UUUU_LLLL_TTTT         _p_a_t_h or _b_u_f points outside the process's allocated address
  116.                     space.
  117.  
  118.      _EEEE_IIII_NNNN_TTTT_RRRR          A signal was caught during _ssss_tttt_aaaa_tttt_vvvv_ffff_ssss execution.
  119.  
  120.      _EEEE_IIII_OOOO            An I/O error occurred while reading the file system.
  121.  
  122.      _EEEE_LLLL_OOOO_OOOO_PPPP          Too many symbolic links were encountered in translating
  123.                     _p_a_t_h.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ssssttttaaaattttvvvvffffssss((((2222))))                                                          ssssttttaaaattttvvvvffffssss((((2222))))
  137.  
  138.  
  139.  
  140.      _EEEE_MMMM_UUUU_LLLL_TTTT_IIII_HHHH_OOOO_PPPP      Components of _p_a_t_h require hopping to multiple remote
  141.                     machines and file system type does not allow it.
  142.  
  143.      _EEEE_NNNN_AAAA_MMMM_EEEE_TTTT_OOOO_OOOO_LLLL_OOOO_NNNN_GGGG   The length of a _p_a_t_h component exceeds {_NNNN_AAAA_MMMM_EEEE______MMMM_AAAA_XXXX}
  144.                     characters, or the length of _p_a_t_h exceeds {_PPPP_AAAA_TTTT_HHHH______MMMM_AAAA_XXXX}
  145.                     characters.
  146.  
  147.      _EEEE_NNNN_OOOO_EEEE_NNNN_TTTT         Either a component of the path prefix or the file referred
  148.                     to by _p_a_t_h does not exist.
  149.  
  150.      _EEEE_NNNN_OOOO_LLLL_IIII_NNNN_KKKK        _p_a_t_h points to a remote machine and the link to that
  151.                     machine is no longer active.
  152.  
  153.      _EEEE_NNNN_OOOO_TTTT_DDDD_IIII_RRRR        A component of the path prefix of _p_a_t_h is not a directory.
  154.  
  155.      _ffff_ssss_tttt_aaaa_tttt_vvvv_ffff_ssss fails if one or more of the following are true:
  156.  
  157.      _EEEE_FFFF_AAAA_UUUU_LLLL_TTTT         _b_u_f points to an invalid address.
  158.  
  159.      _EEEE_BBBB_AAAA_DDDD_FFFF          _f_i_l_d_e_s is not an open file descriptor.
  160.  
  161.      _EEEE_IIII_NNNN_TTTT_RRRR          A signal was caught during _ffff_ssss_tttt_aaaa_tttt_vvvv_ffff_ssss execution.
  162.  
  163.      _EEEE_IIII_OOOO            An I/O error occurred while reading the file system.
  164.  
  165.      _EEEE_FFFF_BBBB_IIII_GGGG          One of the fields overflowed (did not fit in a _uuuu_llll_oooo_nnnn_gggg______tttt).
  166.                     See the description of _ssss_tttt_aaaa_tttt_vvvv_ffff_ssss_6666_4444 and _ffff_ssss_tttt_aaaa_tttt_vvvv_ffff_ssss_6666_4444 above.
  167.  
  168. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  169.      Upon successful completion a value of 0 is returned.  Otherwise, a value
  170.      of -1 is returned and _eeee_rrrr_rrrr_nnnn_oooo is set to indicate the error.
  171.  
  172. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  173.      _cccc_hhhh_mmmm_oooo_dddd(2), _cccc_hhhh_oooo_wwww_nnnn(2), _cccc_rrrr_eeee_aaaa_tttt(2), _llll_iiii_nnnn_kkkk(2), _mmmm_kkkk_nnnn_oooo_dddd(2), _pppp_iiii_pppp_eeee(2), _rrrr_eeee_aaaa_dddd(2),
  174.      _tttt_iiii_mmmm_eeee(2), _uuuu_nnnn_llll_iiii_nnnn_kkkk(2), _uuuu_tttt_iiii_mmmm_eeee(2), _wwww_rrrr_iiii_tttt_eeee(2).
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.